package com.baobao.entity;

import javax.xml.crypto.Data;
import java.util.Objects;

/**
 * User实体类
 */
public class User {
    private int id;
    private String userName;
    private char passWord;
    private String nickName;
    private String phone;
    private String addr;
    private int company_id;
    //创建时间
    private Data create_time;

    //删除时间
    private Data update_time;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public char getPassWord() {
        return passWord;
    }

    public void setPassWord(char passWord) {
        this.passWord = passWord;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public int getCompany_id() {
        return company_id;
    }

    public void setCompany_id(int company_id) {
        this.company_id = company_id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return id == user.id && passWord == user.passWord && company_id == user.company_id && Objects.equals(userName, user.userName) && Objects.equals(nickName, user.nickName) && Objects.equals(phone, user.phone) && Objects.equals(addr, user.addr);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userName, passWord, nickName, phone, addr, company_id);
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", passWord=" + passWord +
                ", nickName='" + nickName + '\'' +
                ", phone='" + phone + '\'' +
                ", addr='" + addr + '\'' +
                ", company_id=" + company_id +
                '}';
    }

    public User() {
    }

    public User(int id, String userName, char passWord, String nickName, String phone, String addr, int company_id) {
        this.id = id;
        this.userName = userName;
        this.passWord = passWord;
        this.nickName = nickName;
        this.phone = phone;
        this.addr = addr;
        this.company_id = company_id;
    }
}
